var express = require('express');
var router = express.Router();

/* GET users listing. */
router.get('/', function(req, res, next) {
  res.send('respond with a resource');
});

router.get('/info', function(req, res, next) {
	res.json({code: 0, data: {id: 0, mobile: '15291985843'}, msg: '查询成功'})
})

router.post('/login', function(req, res, next) {
	res.json({code: 0, data: {id: 0, mobile: req.body.mobile, token: 'login success'}, msg: '登录成功'})
})

router.post('/register', function(req, res, next){
	res.json({code: 0, msg: '注册成功'})
})

router.post('/logout', function(req, res, next) {
	res.json({code: 0, msg: '退出成功'})
})

module.exports = router;
